<?php
class Course_type_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
    
    function get($data)
    {
    	if (isset($data['idlevel']) && is_numeric($data['idlevel'])) {
    		$this->db->where('idlevel', $data['idlevel']);
    	}
    	
    	$this->db->order_by('id');
    	return $this->db->get('course_type');
    }
}
?>